package com.task.core.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.task.common.domain.info.KeyAndValue;
import com.task.core.domain.EngineSchemeInfo;
import com.task.core.domain.RelationEngineAndSchemeInfo;
import com.task.core.dto.request.EngineSchemeRequestDTO;

/**
 * @author 迪迦.
 * @date 2025/1/6 16:48
 */
@Mapper
public interface EngineSchemeMapper {

  List<EngineSchemeInfo> getEngineSchemeByPage(EngineSchemeRequestDTO request);

  EngineSchemeInfo getEngineSchemeDetail(String code);

  List<KeyAndValue> getEngineSchemeForOption(EngineSchemeRequestDTO request);

  void addEngineScheme(EngineSchemeRequestDTO request);

  Integer modifyEngineScheme(EngineSchemeRequestDTO request);

  Integer deleteEngineScheme(@Param("code") String engineSchemeCode, @Param("userId") Long userId);

  List<String> getAllCodes();

  List<RelationEngineAndSchemeInfo> getRelation(String engineSchemeCode);

  void addRelation(@Param("engineSchemeCode") String engineSchemeCode, @Param("relation") List<RelationEngineAndSchemeInfo> engineAndWeights);

  void deleteRelation(String engineSchemeCode);

  List<String> getAllCodesByEngineCode(@Param("engineCode") String engineCode);

    EngineSchemeInfo getEngineSchemeByCode(@Param("engineSchemeCode")String engineSchemeCode);

  List<RelationEngineAndSchemeInfo> getEngineAndEngineSchemeRelation(@Param("engineSchemeCode")String engineSchemeCode);

  EngineSchemeInfo getEngineSchemeDetailByCode(EngineSchemeRequestDTO engineSchemeRequestDTO);
}
